package Model

import (
	"time"
)

type BaseInformation struct {
	Id   string `json:"id"`   //员工编号
	Name string `json:"name"` //姓名
}

/*员工表*/
type APIEmployee struct {
	Id string `json:"id"`
	Name             string    `json:"name" form:"name"` //姓名
	Sex              string    `json:"sex" form:"sex"`
	DepartmentNumber int       `json:"department_number" form:"department_number"` //部门编号
	PostNumber       int       `json:"post_number" form:"post_number"`             //岗位编号
	EntryDate        time.Time `json:"entry_date" form:"entry_date"`
	HighestEducation string    `json:"highest_education" form:"highest_education"` //是否离职
}

// 返回报表
type ResultEmployee struct {
	Id               string `json:"id" form:"id"`
	DepartmentName   string `json:"department_name" form:"department_name"` //部门编号
	PostName         string `json:"post_name" form:"post_name"`
	Name             string `json:"name" form:"name"` //姓名
	Sex              string `json:"sex" form:"sex"`
	EntryDate        string `json:"entry_date" form:"entry_date"`
	HighestEducation string `json:"highest_education" form:"highest_education"` //是否离职
}

// 共同数据
type UniEmployee struct {
	Id                  string `json:"id" form:"id" gorm:"primaryKey"`       //员工编号
	Password            string `json:"password" form:"password"`             // 密码
	EmployeeType        string `json:"employee_type" form:"employee_type"`   //员工类型
	Name                string `json:"name" form:"name"`                     //姓名
	Sex                 string `json:"sex" form:"sex"`                       //性别
	IdCard              string `json:"id_card" form:"id_card"`               //身份证号
	Political           string `json:"political" form:"political"`           //政治面貌
	Nation              string `json:"nation" form:"nation"`                 //民族
	NativePlace         string `json:"native_place" form:"native_place"`     //籍贯
	Phone               string `json:"phone" form:"phone"`                   //电话
	Email               string `json:"email" form:"email"`                   //电子邮箱
	Height              int    `json:"height" form:"height"`                 //身高
	BloodType           string `json:"blood_type" form:"blood_type"`         //血型
	MaritalStatus       string `json:"marital_status" form:"marital_status"` //婚姻状况
	Birthplace          string `json:"birthplace" form:"birthplace"`         //出生地
	RegisteredResidence string `json:"registered_residence" form:"registered_residence"`
	EmploymentForm      string `json:"employment_form" form:"employment_form"`     //用工形式
	PersonnelSource     string `json:"personnel_source" form:"personnel_source"`   //人员来源
	HighestEducation    string `json:"highest_education" form:"highest_education"` //最高学历
	GraduationSchool    string `json:"graduation_school" form:"graduation_school"` //毕业院校
	MajorStudied        string `json:"major_studied" form:"major_studied"`         //所学专业//户口所在地
	IsProbation         string `json:"is_probation" form:"is_probation"`           // 是否试用期
}

// 添加数据
type NewEmployee struct {
	UniEmployee
	Birthday       string `json:"birthday" form:"birthday"`               //出生日期
	DepartmentName string `json:"department_name" form:"department_name"` //部门名称
	PostName       string `json:"post_name" form:"post_name"`             //岗位名称
	EntryDate      string `json:"entry_date" form:"entry_date"`           //入职日期
	GraduationDate string `json:"graduation_date" form:"graduation_date"` //毕业日期
	ProbationStart string `json:"probation_start" form:"probation_start"` // 试用期开始
	ProbationEnd   string `json:"probation_end" form:"probation_end"`     // 试用期结束
}

// 接受数据
type ReturnEmployee struct {
	NewEmployee
	IsQuit string `json:"is_quit" form:"is_quit"`
}

type Employee struct {
	UniEmployee
	Birthday         time.Time `json:"birthday" form:"birthday"`
	DepartmentNumber int       `json:"department_number" form:"department_number"` //部门编号
	PostNumber       int       `json:"post_number" form:"post_number"`             //岗位编号
	EntryDate        time.Time `json:"entry_date" form:"entry_date"`               //入职日期
	GraduationDate   time.Time `json:"graduation_date" form:"graduation_date"`     //毕业日期
	ProbationStart   time.Time `json:"probation_start" form:"probation_start"`     // 试用期开始
	ProbationEnd     time.Time `json:"probation_end" form:"probation_end"`         // 试用期结束
	IsQuit           string    `json:"is_quit" form:"is_quit"`                     //是否离职
}
